<?php defined('_JEXEC') or die; ?>

<script type="text/javascript">
	$(document).ready(function(){
	
    check_reset=function(){
      if(($('#email').attr("value") == "" )){
            $('#alert').html('Udfyld venligst Email');
            $('#backoverlay').show();
            $('#show_popup').show();
            $('#f_focus').html('email');
            return false;	
        }       
        else{
            if(!isEmail($('#email').val())){
                $('#alert').html('Venligst e-mail er gyldig');
                $('#backoverlay').show();
                $('#show_popup').show();
                $('#s_focus').html('email');
                return false; 
            }
        }	
        $('#check_reset').click();
        
        return true;
	};    
     isEmail=function(string) {
		if (string.search(/^\w+((-\w+)|(\.\w+)|(\_\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
			return true;
		else return false;
    };
    close_popup=function(){		
		var fel=$('#f_focus').html();
        $('#backoverlay').hide();
		$('#show_popup').hide();
		$('#' + fel ).focus();
	};
    
    });

</script> 
<div id="main">
	<div id="content">
		<h1 class="page-title">NULSTILLE ADGANGSKODE</h1>
		<!-- Begin corporate structure  -->
		<div class="content-ctn grid-bg">
			<div id="accountContent">
				<form action="<?php echo JRoute::_( 'index.php?option=com_user&task=requestreset' ); ?>" method="post" id="opretKontoForm" name="josForm">
					<fieldset>
						<!--Kunde infomation-->
						<div class="client-info block-decor fl-left">
							<div class="form-set-ctn">
								<h2><?php echo $this->escape($this->params->get('page_title')); ?></h2>
								<?php echo JText::_('RESET_PASSWORD_REQUEST_DESCRIPTION'); ?>
								<div class="input-set">
									
									<label id="emailmsg" for="email"><?php echo JText::_('Email'); ?><span>*</span></label>
									<input type="text" id="email" name="email" size="36" value="" title="<?php echo JText::_('RESET_PASSWORD_EMAIL_TIP_TITLE'); ?>::<?php echo JText::_('RESET_PASSWORD_EMAIL_TIP_TEXT'); ?>" class="input-txt">
								</div>
							</div>
						</div>
						<div class="form-submit">
							<a href="javascript:void(0);" onclick="check_reset();" class="send-btn fl-left"><?php echo JText::_('SEND'); ?></a>
							
						</div>
					</fieldset>
					<button type="submit" class="validate" id="check_reset" style="display:none" ><?php echo JText::_('Submit'); ?></button>
						<?php echo JHTML::_( 'form.token' ); ?>
					
					</form>
			</div>
		</div>                              
	</div>
</div>


